package com.ruoyi.bussiness.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bussiness.mapper.PubVehicleMapper;
import com.ruoyi.bussiness.domain.PubVehicle;
import com.ruoyi.bussiness.service.IPubVehicleService;
import com.ruoyi.common.core.text.Convert;

/**
 * 车辆Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-11-12
 */
@Service
public class PubVehicleServiceImpl implements IPubVehicleService 
{
    @Autowired
    private PubVehicleMapper pubVehicleMapper;

    /**
     * 查询车辆
     * 
     * @param id 车辆主键
     * @return 车辆
     */
    @Override
    public PubVehicle selectPubVehicleById(Long id)
    {
        return pubVehicleMapper.selectPubVehicleById(id);
    }

    /**
     * 查询车辆列表
     * 
     * @param pubVehicle 车辆
     * @return 车辆
     */
    @Override
    public List<PubVehicle> selectPubVehicleList(PubVehicle pubVehicle)
    {
        return pubVehicleMapper.selectPubVehicleList(pubVehicle);
    }

    /**
     * 新增车辆
     * 
     * @param pubVehicle 车辆
     * @return 结果
     */
    @Override
    public int insertPubVehicle(PubVehicle pubVehicle)
    {
        return pubVehicleMapper.insertPubVehicle(pubVehicle);
    }

    /**
     * 修改车辆
     * 
     * @param pubVehicle 车辆
     * @return 结果
     */
    @Override
    public int updatePubVehicle(PubVehicle pubVehicle)
    {
        return pubVehicleMapper.updatePubVehicle(pubVehicle);
    }

    /**
     * 批量删除车辆
     * 
     * @param ids 需要删除的车辆主键
     * @return 结果
     */
    @Override
    public int deletePubVehicleByIds(String ids)
    {
        return pubVehicleMapper.deletePubVehicleByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除车辆信息
     * 
     * @param id 车辆主键
     * @return 结果
     */
    @Override
    public int deletePubVehicleById(Long id)
    {
        return pubVehicleMapper.deletePubVehicleById(id);
    }
}
